<template>
  <ContainerGroup>
    <Container>
      <div class="ck-filter-form" :style="{ height: containerHeight }">
        <div ref="input-container" class="form-item-container">
          <div class="form-item">
            <span class="form-item-label">院区：</span>
            <el-select
              v-model="ruleForm.region"
              placeholder="请选择院区"
              size="mini"
              style="width: 180px"
              filterable
              @change="changeHospital"
            >
              <el-option
                v-for="item in ruleFormSelect.regionoptions"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              />
            </el-select>
          </div>
          <div class="form-item">
            <span class="form-item-label">床位类型：</span>
            <el-select
              v-model="ruleForm.bedType"
              placeholder="请选择床位类型"
              size="mini"
              style="width: 180px"
              filterable
              clearable
              @change="changeBedType"
            >
              <el-option
                v-for="item in ruleFormSelect.bedTypeoptions"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              />
            </el-select>
          </div>
          <div class="form-item">
            <span class="form-item-label">床位状态：</span>
            <el-select
              v-model="ruleForm.bedStatus"
              placeholder="请选择床位状态"
              size="mini"
              style="width: 180px"
              filterable
              clearable
              @change="changeBedStatus"
            >
              <el-option
                v-for="item in ruleFormSelect.bedStatusoptions"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              />
            </el-select>
          </div>
          <div class="form-item">
            <span class="form-item-label">科室：</span>
            <el-select
              v-model="ruleForm.deptCode"
              placeholder="请选择科室"
              size="mini"
              style="width: 180px"
              filterable
              clearable
              @change="deptChange"
            >
              <el-option
                v-for="item in ruleFormSelect.deptCodeoptions"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              />
            </el-select>
          </div>
          <div class="form-item">
            <span class="form-item-label">病区：</span>
            <el-select
              v-model="ruleForm.nurseCellCode"
              placeholder="请选择病区"
              size="mini"
              style="width: 180px"
              filterable
              clearable
              @change="nurseCellChange"
            >
              <el-option
                v-for="item in ruleFormSelect.nurseCellCodeoptions"
                :key="item.value"
                :label="item.label"
                :value="item.value"
              />
            </el-select>
          </div>
        </div>
        <div class="right-btn-container">
          <div
            v-for="(item, index) in buttonList"
            :key="index + '_'"
            class="form-item-btn"
          >
            <Button
              :type="item.type"
              :icon="item.icon"
              :loading="item.loading"
              @click="item.handlerClick"
            >{{ item.label }}</Button>
          </div>
          <span
            v-show="showCloseAndOpen"
            class="more-text"
            @click="openAndCloseFilterForm"
          >{{ openOrCloseText }}</span>
        </div>
      </div>
    </Container>
    <Container
      height="fill"
      style="overflow: hidden; padding-bottom: 0"
      class="container-con"
    >
      <div class="tag-remark">
        <div style="margin-right:10px"> 集管空床数/全院空床位总数：{{ bedNum }}</div>
      </div>
      <div
        v-loading="warploading"
        class="warp"
        style="height: calc(100% - 50px)"
      >
        <div :style="widthStyle" class="department-box animate">
          <Empty v-if="alldata.length === 0" style="margin: 20px auto" />
          <div
            v-for="(item, index) in alldata"
            :key="index"
            class="ment"
            :class="item.classErt"
            @click="openMent(item, index,$event)"
          >
            <div class="ment-title">
              {{ item.areaName }}({{ item.deptName }})
            </div>
            <div class="ment-content">
              <span>床位总数 {{ item.bedsCount }} </span>
              <!-- <el-tooltip class="item" effect="dark" content="Top Left 提示文字" placement="top-end"> -->
              <el-progress
                :text-inside="true"
                :stroke-width="16"
                class="progress"
                :percentage="item.usedBedsCountDouble"
              />
              <!-- </el-tooltip> -->
            </div>
            <div class="ment-details">
              <!-- 非集管 -->
              <div
                v-if="
                  bedType[0] === '0' ||
                    bedType.length === 2 ||
                    bedType.length === 0
                "
                style="width: 50%; border-right: 1px solid #e5e5e5"
              >
                <div class="letuer-title" style="color: #b2b2b2">
                  <span style="color: #b2b2b2">非集管床位</span>
                  <span
                    style="
                          margin-left: 10px;
                          display: inline-block;
                          color: #b2b2b2;
                        "
                  >{{ item.noFocusManager }}</span>
                </div>
                <div class="letuer-content">
                  <div class="letuer-square" style="color: #b2b2b2">
                    空床
                  </div>
                  <div class="letuer-square">
                    <div class="square-color-one" />
                    <div
                      style="
                            display: inline-block;
                            color: #f5b923;
                            margin-left: 2px;
                          "
                    >
                      {{ item.manEmptyBedsCount1 }}
                    </div>
                  </div>
                  <div class="letuer-square">
                    <div class="square-color-two" />
                    <div
                      style="
                            display: inline-block;
                            color: #f5b923;
                            margin-left: 2px;
                          "
                    >
                      {{ item.womanEmptyBedsCount1 }}
                    </div>
                  </div>
                  <div class="letuer-square">
                    <div class="square-color-three" />
                    <div
                      style="
                            display: inline-block;
                            color: #f5b923;
                            margin-left: 2px;
                          "
                    >
                      {{ item.unknownEmptyBedsCount1 }}
                    </div>
                  </div>
                </div>
              </div>
              <!-- 集管 -->
              <div
                v-if="
                  bedType[0] === '1' ||
                    bedType.length === 2 ||
                    bedType.length === 0
                "
                style="width: 50%"
              >
                <div class="letuer-title">
                  <span style="color: #888888">集管床位</span>
                  <span
                    style="
                          margin-left: 10px;
                          display: inline-block;
                          color: #888888;
                        "
                  >{{ item.focusManager }}</span>
                  <span style="color: #888888">
                    已预约 {{ item.registerBedCount }}</span>
                </div>
                <div class="letuer-content">
                  <span
                    class="letuer-square"
                    style="color: #888888"
                  >空床</span>
                  <div class="letuer-square">
                    <div class="square-color-one" />
                    <div
                      style="
                            display: inline-block;
                            color: #f5b923;
                            margin-left: 2px;
                          "
                    >
                      {{ item.manEmptyBedsCount }}
                    </div>
                  </div>
                  <div class="letuer-square">
                    <div class="square-color-two" />
                    <div
                      style="
                            display: inline-block;
                            color: #f5b923;
                            margin-left: 2px;
                          "
                    >
                      {{ item.womanEmptyBedsCount }}
                    </div>
                  </div>
                  <div class="letuer-square">
                    <div class="square-color-three" />
                    <div
                      style="
                            display: inline-block;
                            color: #f5b923;
                            margin-left: 2px;
                          "
                    >
                      {{ item.unknownEmptyBedsCount }}
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div v-if="close" class="bed-box">
          <div class="top-twobtn">
            <div class="left-btn" @click="goback()">
              <span><img
                class="title-img"
                src="../../assets/image/left-jt.png"
                alt=""
              ></span>
              <span
                style="
                      display: inline-block;
                      margin: 2px 10px;
                      vertical-align: top;
                    "
              >返回列表</span>
            </div>
            <div
              class="left-btn"
              style="font-weight: normal; margin-left: 10px"
            >
              <span style="padding: 0px 10px">
                {{ currentBedData.areaName }}({{ currentBedData.deptName }})
              </span>
              <span style="padding: 0px 10px">
                总床位数：{{ currentBedData.bedsCount }}
              </span>
              <span style="padding: 0px 10px">
                非集管床位数：{{ currentBedData.noFocusManager }}
              </span>
              <span style="padding: 0px 10px">
                集管床位数：{{ currentBedData.focusManager }}
              </span>
            </div>
            <div class="right-btn">
              <el-popover placement="bottom" trigger="click">
                <div>
                  <div style="margin-bottom: 20px; font-weight: bold">
                    标签说明
                  </div>
                  <div>
                    <table style="text-align: center; width: 300px">
                      <tr>
                        <td style="height: 60px">
                          <img
                            src="../../assets/image/time-icon.png"
                            style="width: 18px"
                          >
                          <p>已预约</p>
                        </td>
                        <td>
                          <img
                            src="../../assets/image/red-flone.png"
                            style="width: 15px"
                          >
                          <p>集中管理</p>
                        </td>
                        <td>
                          <img
                            src="../../assets/image/occupationState-logo.png"
                            style="width: 14px"
                          >
                          <p>占床</p>
                        </td>
                      </tr>
                      <tr>
                        <td style="height: 80px">
                          <div
                            style="
                                  width: 45px;
                                  border-radius: 5px;
                                  height: 20px;
                                  display: inline-block;
                                  background: #fc9691;
                                "
                          />
                          <p>女</p>
                        </td>
                        <td style="height: 80px">
                          <div
                            style="
                                  width: 45px;
                                  border-radius: 5px;
                                  height: 20px;
                                  display: inline-block;
                                  background: #71acfd;
                                "
                          />
                          <p>男</p>
                        </td>
                        <td style="height: 80px">
                          <div
                            style="
                                  width: 45px;
                                  border-radius: 5px;
                                  height: 20px;
                                  display: inline-block;
                                  background: #f3f2f2;
                                "
                          />
                          <p>空</p>
                        </td>
                      </tr>
                    </table>
                  </div>
                </div>
                <div slot="reference">
                  <span><img
                    class="title-img"
                    src="../../assets/image/right-wh.png"
                    alt=""
                  ></span>
                  <span
                    style="
                          display: inline-block;
                          margin: 2px 10px;
                          vertical-align: top;
                        "
                  >标签说明</span>
                </div>
              </el-popover>
            </div>
          </div>
          <!-- 房间 -->
          <div class="allroom">
            <div
              v-for="(item, index) in allRoom"
              :key="index"
              class="allbed"
              :style="
                'width:' +
                  (item.length * 110 + (item.length - 1) * 10) +
                  'px'
              "
            >
              <div class="ment-box">
                <div
                  v-for="(ytem, index1) in item"
                  :key="index1"
                  class="ment-position"
                  :class="ytem.sexColor"
                >
                  <div class="room-status">
                    <img
                      v-if="ytem.isHisConfirm === '1'"
                      src="../../assets/image/time-icon.png"
                      class="status-img"
                      alt=""
                      style="width: 12px; height: 12px"
                    >
                    <img
                      v-if="ytem.occupationState === '0'"
                      src="../../assets/image/occupationState-logo.png"
                      class="status-img"
                      alt=""
                    >
                    <img
                      v-if="ytem.ifGy === '1'"
                      src="../../assets/image/red-flone.png"
                      class="status-img"
                      alt=""
                      style="width: 10px; height: 14px"
                    >
                  </div>
                  <div class="room-num">{{ ytem.name }}</div>
                  <div v-if="ytem.bedState === 'a' || ytem.isHisConfirm ==='1'" class="ment-name">
                    {{ ytem.patinetName }}
                  </div>
                  <div v-if="ytem.occupationState === '0'" class="ment-name">
                    {{ ytem.occupationBed.patientName }}
                  </div>
                  <div
                    v-if="
                      ytem.bedState === 'b' && ytem.sexColor === 'three-div' && ytem.occupationState !== '0' && ytem.isHisConfirm !=='1'
                    "
                    class="ment-name"
                  >
                    <img
                      src="../../assets/image/eeeeeee.png"
                      class="bed-img"
                      alt=""
                    >
                  </div>
                  <div
                    v-if="
                      ytem.bedState === 'b' && ytem.sexColor !== 'three-div' && ytem.occupationState !== '0'
                    "
                    class="ment-name"
                  >
                    <img
                      src="../../assets/image/ffffff.png"
                      class="bed-img"
                      alt=""
                    >
                  </div>
                  <!-- <img
                    v-if="ytem.bedState === 'b'"
                    src="../../assets/image/eeeeeee.png"
                    class="bed-img"
                    alt=""
                  /> -->
                </div>
              </div>
              <div class="house-num">{{ item[0].roomNo }}</div>
            </div>
          </div>
        </div>
      </div>
    </Container>
  </ContainerGroup>
</template>

<script>
import {
  // getEemptyBedsList,
  getEemptyBedsDetailsNew,
  getDeptList,
  getPatientAreaDTO,
  getAllManageBed,
  getWardList,
  getHisCwglDeptByAreaCode,
  getEemptyBedsListNew
} from '../../utils/apis/registrationApi'
export default {
  name: 'Index',
  data() {
    return {
      buttonList: [
        {
          label: '查询',
          type: 'primary',
          icon: 'search',
          handlerClick: this.getRooms
        },
        {
          label: '重置',
          type: 'info',
          icon: 'reset',
          handlerClick: this.handlerReset
        }
      ], // 头部按钮
      containerHeight: '35px',
      showCloseAndOpen: false,
      openOrCloseText: '展开',
      currentBedData: {},
      bedStatus: ['1'], // 床位状态
      bedType: '', // 床位类型
      warploading: true,
      total: 0,
      activeName: 'first',
      pageInfor: {
        pageSize: 10,
        pageNum: 1
      },
      hospitalDistrict: '', // 院区
      alldata: [],
      alldataShui: [],
      widthStyle: 'width:' + window.screen.width + 'px',
      allRoom: [],
      close: false,
      tableLoading: false,
      dialogVisible: false,
      drawerVisible: false,
      beforData: {},
      beforIndex: 0,
      ruleFormSelect: {
        deptCodeoptions: [],
        nurseCellCodeoptions: [],
        bedStatusoptions: [
          // {
          //   value: '1,2',
          //   label: '全部'
          // },
           {
            value: '1',
            label: '空床'
          },
          // {
          //   value: '2',
          //   label: '非空床'
          // }
        ],
        bedTypeoptions: [
          {
            value: '1,0',
            label: '全部'
          },
          {
            value: '1',
            label: '集中'
          },
          {
            value: '0',
            label: '非集中'
          }
        ],
        regionoptions: [
          {
            value: '1',
            label: '三香院区'
          },
          {
            value: '2',
            label: '浒关院区'
          }
        ]
      },
      ruleForm: {
        deptCode: '',
        nurseCellCode: '',
        bedStatus: '1',
        bedType: '',
        region: ''
      },
      tableData: [],
      bedNum: '' // 床位总数
    }
  },
  mounted() {
    this.getRooms()
    this.getDept()
    this.getWard()
    this.maxWidthpx = window.screen.width
    this.tableLoading = true
    const yard = this.ruleForm.region
    this._bedNum(yard)
    this.initShowCloseOrOpen()
    window.addEventListener('resize', this.initShowCloseOrOpen)
  },
  beforeDestroy() {
    window.removeEventListener('resize', this.initShowCloseOrOpen)
  },
  methods: {
    initShowCloseOrOpen() {
      setTimeout(() => {
        this.showCloseAndOpen = this.$refs['input-container'].scrollHeight > 35
      }, 50)
    },
    openAndCloseFilterForm() {
      this.containerHeight = this.openOrCloseText === '展开' ? 'auto' : '35px'
      this.openOrCloseText = this.openOrCloseText === '展开' ? '收起' : '展开'
    },
    // 院区变化- 请求
    changeHospital() {
      this.goback()
      const yard = this.ruleForm.region
      this._bedNum(yard)
      const state = this.ruleForm.region
      if (state === '1') {
        this.hospitalDistrict = '1'
      } else if (state === '2') {
        this.hospitalDistrict = '2'
      } else {
        this.hospitalDistrict = ''
      }
      this.getRooms()
    },
    // 床位类型变化-请求
    changeBedType() {
      const state = this.ruleForm.bedType
      if (state === '1') {
        this.bedType = '1'
      } else if (state === '0') {
        this.bedType = '0'
      } else if (state === '1,0') {
        this.bedType = ''
      } else {
        this.bedType = ''
      }
      this.getRooms()
      //  1 集中   0 非集中
    },
    // 床位状态变化-请求
    changeBedStatus() {
      const state = this.ruleForm.bedStatus
      if (state === '1') {
        this.bedStatus = ['1']
      } else if (state === '2') {
        this.bedStatus = ['2']
      } else if (state === '1,2') {
        this.bedStatus = ['1', '2']
      } else {
        this.bedStatus = ['1', '2']
      }
      //  1 空床   2 非空
      this.getRooms()
    },
    _bedNum(tab) {
      const yard = tab
      getAllManageBed({ yard: yard }).then((res) => {
        if (res.data.code === 200) {
          this.bedNum = res.data.data
        }
      })
    },
    // 获取病区下拉数据
    getWard() {
      this.ruleFormSelect.nurseCellCodeoptions = []
      const parms = {
        yard: this.ruleForm.region
      }
      getWardList(parms).then((res) => {
        if (res.data.code === 200) {
          let dats = {
            label: '',
            value: ''
          }
          res.data.data.forEach((element) => {
            dats = {
              label: element.deptName,
              value: element.deptCode
            }
            this.ruleFormSelect.nurseCellCodeoptions.push(dats)
          })
        }
      })
    },
    // 获取科室下拉数据
    getDept() {
      this.ruleFormSelect.deptCodeoptions = []
      const parms = {
        districtCodeList: ['1', '2']
      }
      getDeptList(parms).then((res) => {
        if (res.data.code === 200) {
          let dats = {
            label: '',
            value: ''
          }
          res.data.data.forEach((element) => {
            dats = {
              label: element.deptName,
              value: element.deptCode
            }
            this.ruleFormSelect.deptCodeoptions.push(dats)
          })
        }
      })
    },
    // 根据科室查病区
    deptChange() {
      this.ruleFormSelect.nurseCellCodeoptions = []
      getPatientAreaDTO({ deptCode: this.ruleForm.deptCode,areaCode:this.ruleForm.nurseCellCode,yard:this.ruleForm.region }).then(
        (res) => {
          if (res.data.code === 200) {
            let dats = {
              label: '',
              value: ''
            }
            res.data.data.forEach((element) => {
              dats = {
                label: element.areaName,
                value: element.areaId
              }
              this.ruleFormSelect.nurseCellCodeoptions.push(dats)
            })
          }
        }
      )
    },
    nurseCellChange() {
      if (this.ruleForm.deptCode === '') {
        this.ruleFormSelect.deptCodeoptions = []
        const yard = this.ruleForm.region
        getHisCwglDeptByAreaCode({ areaCode: this.ruleForm.nurseCellCode,yard:yard }).then(
          (res) => {
            if (res.data.code === 200) {
              let dats = {
                label: '',
                value: ''
              }
              res.data.data.forEach((element) => {
                dats = {
                  label: element.deptName,
                  value: element.deptCode
                }
                this.ruleFormSelect.deptCodeoptions.push(dats)
              })
            }
          }
        )
      }
    },
    // 获取房间
    getRooms(data) {
      this.warploading = true
      const areaCodee = this.ruleForm.nurseCellCode
      const deptCodee = this.ruleForm.deptCode
      let sfkcID = ''
      if (this.bedStatus[0] === '1') {
        // 空床1
        sfkcID = 'b'
      }
      if (this.bedStatus[0] === '2') {
        // 非空 2
        sfkcID = 'a'
      }
      if (this.bedStatus.length === 2) {
        sfkcID = ''
      }
      const parms = {
        areaCode: areaCodee,
        bedState: sfkcID,
        bedType: this.bedType,
        deptCode: deptCodee,
        districtCode: this.hospitalDistrict,
        bedNo: ''
      }
      getEemptyBedsListNew(parms).then((res) => {
        if (res.data.code === 200) {
          this.warploading = false
          this.alldata = []
          res.data.data.forEach((item) => {
            item.classErt = ''
            this.alldata.push(item)
          })
        }
      })
    },
    openMent(data, index,e) {
      const el = e.currentTarget
      this.warploading = true
      this.beforData = data
      this.beforIndex = index
      this.currentBedData = data
      this.close = true
      this.widthStyle = 'width:380px;'
      this.alldata.forEach((ele, i) => {
        if (i === index) {
          ele.classErt = 'colorNr'
        } else {
          ele.classErt = 'yuanNr'
        }
      })
      this.alldataShui.forEach((ele, i) => {
        if (i === index) {
          ele.classErt = 'colorNr'
        } else {
          ele.classErt = 'yuanNr'
        }
      })
      let sfkcID = ''
      if (this.bedStatus[0] === '1') {
        // 空床1
        sfkcID = 'b'
      }
      if (this.bedStatus[0] === '2') {
        // 非空 2
        sfkcID = 'a'
      }
      if (this.bedStatus.length === 2) {
        sfkcID = ''
      }

      // cww Modify
      // const parms = {
      //  areaCode: data.areaCode,
      //  bedTypeCodeList: [this.bedType],
      //  deptCode: data.deptCode,
      //  districtCodeList: [this.hospitalDistrict],
      //  sfkc: sfkcID,
      //  name: data.yeadName + data.areaName
      // }

      const parms = {
        areaCode: data.areaCode,
        bedState: sfkcID,
        bedType: this.bedType,
        deptCode: data.deptCode,
        districtCode: this.hospitalDistrict,
        name: ''
      }

      getEemptyBedsDetailsNew(parms).then((res) => {
        if (res.data.code === 200) {
          this.warploading = false
          console.log(res.data)
          this.allRoom = res.data.data
          el.scrollIntoView()
        }
      })
    },
    // 返回列表
    goback() {
      this.close = false
      this.widthStyle = 'width:' + this.maxWidthpx + 'px'
    },
    format(percentage) {
      return percentage === 100 ? '100' : `${percentage}`
    },
    handleFun() {},

    pageChange(page) {
      console.log(page)
    },
    handlerEidt(row) {
      this.dialogVisible = true
    },
    handlerDetail(row) {
      console.log(row)
      this.drawerVisible = true
    },

    // 重置
    handlerReset() {
      this.ruleFormSelect.nurseCellCodeoptions = []
      this.ruleForm = {
        deptCode: '',
        nurseCellCode: '',
        bedStatus: '1',
        bedType: '',
        region: ''
      }
      this.bedType = ''
      this.bedStatus = ['1']
      this.hospitalDistrict = ''
      this.getRooms()
    },
    handlerDelete(row) {
      this.$confirm({
        content: '确定要删除该项吗？',
        title: '确认信息',
        okFn: (res) => {
          console.log(res)
        },
        cancelFn: (res) => {
          console.log('取消')
        }
      })
    },
    handlerDeleteAll(params) {
      console.log(this.$toast.warning('失败了'))
      // this.$toast.warning("成功了")
    },
    dialogConfirm() {
      console.log('ss')
    },
    drawConfirm() {
      console.log('drawer')
    },
    getSelectionItems(list) {
      console.log(list)
    }
  }
}
</script>
<style lang="less" scoped>
.tag-remark {
  position: absolute;
  right: 10px;
  top: 0px;
  height: 50px;
  display: flex;
  line-height: 20px;
  justify-content: center;
  align-items: center;
}
.form-item {
  min-width: 280px;
  height: 28px;
}
.title-img {
  width: 18px;
  height: 18px;
  vertical-align: middle;
}
.colorNr {
  border-color: #217dfa !important;
}
.yuanNr {
  border-color: #e5e5e5 !important;
}
.left-btn {
  float: left;
  font-size: 16px;
  font-weight: bold;
  color: #555555;
}
.right-btn {
  float: right;
  font-size: 16px;
  font-weight: bold;
  color: #555555;
}
.top-twobtn {
  width: 100%;
  background-color: #fff;
  padding: 8px 13px;
  box-sizing: border-box;
  overflow: hidden;
  border: 1px solid #eeeeee;
  border-radius: 4px;
  margin-bottom: 11px;
}
.top-twobtn span {
  cursor: pointer;
}
.bed-box {
  flex: 1;
  height: 100%;
  margin-top: 10px;
  box-sizing: border-box;
  margin-left: 7px;
  overflow-x: hidden;
}
.warp {
  width: 100%;
  height: 100%;
  display: flex;
  padding-top: 30px;
  align-items: flex-start;
  box-sizing: border-box;
}
.letuer-title {
  padding-left: 10px;
  box-sizing: border-box;
}
.letuer-square {
  margin-right: 7px;
}
.square-color-one,
.square-color-two,
.square-color-three {
  width: 17px;
  height: 17px;
  display: inline-block;
  margin: -3px 0;
}
.square-color-one {
  background-color: #71acfd;
}
.square-color-two {
  background-color: #fc9691;
}
.square-color-three {
  background-color: #e5e5e5;
}
.letuer-content {
  display: flex;
  margin-top: 10px;
  padding-left: 10px;
  box-sizing: border-box;
}
.ment-details {
  margin-top: 10px;
  font-size: 16px !important;
  display: flex;
}
.progress {
  width: 68%;
  display: inline-block;
}
.ment-content {
  font-size: 16px !important;
  color: #888888;
  text-align: center;
}
.ment-title {
  font-size: 20px;
  font-weight: 600;
  padding: 17px 0;
  color: #555555;
  text-align: center;
}
.department-box {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  max-height: calc(100% - 20px);
  overflow-y: auto;
  scroll-behavior: smooth;
}
.ment {
  width: 362px;
  height: 160px;
  box-shadow: 0px 3px 3px 0px rgba(33, 101, 249, 0.09);
  margin: 7px 8px 3px 0;
  border: 1px solid #eeeeee;
  border-radius: 4px;
  background-color: #fff;
  cursor: pointer;
}
.ck-filter-form {
  display: flex;
  align-items: top;
  overflow: hidden;
  .form-item-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    // height: 28px;
    .form-item {
      display: flex;
      align-items: center;
      margin: 3px;
      margin-right: 15px;
      .form-item-label {
        color: #909399;
        text-align: right;
        font-size: 16px;
        white-space: nowrap;
      }
    }
  }
  .right-btn-container {
    text-align: center;
    display: flex;
    padding-top: 5px;
    .form-item-btn {
      margin: 0px 3px;
    }
    .more-text {
      display: block;
      width: 50px;
      margin-top: 6px;
      color:#2165f9;
      cursor: pointer;
      user-select: none;
    }
  }
}
</style>
<style lang="less">
.form-item-label {
  color: #909399;
  text-align: right;
  font-size: 15px;
  white-space: nowrap;
}
.ck-filter-form .form-item-container .form-item .form-item-label {
  font-size: 15px !important;
}
.container-con{
  position: relative;
}
.container-con .el-tabs__content {
  height: 100%;
}
</style>
<style lang="less" scoped>
@keyframes mymove {
  form {
    width: 375px;
  }
  to {
    width: 100%;
  }
}
.room-num {
  font-size: 21px;
  text-align: center;
}
.ment-name {
  text-align: center;
  padding-top: 3px;
  box-sizing: border-box;
}
.status-img {
  margin-right: 10px;
}
.room-status {
  height: 30px;
  text-align: right;
}
.ment-box {
  width: 100%;
  height: 113px;
  display: flex;
  justify-content: space-between;
}
// 房间样式
.allroom {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  width: 100%;
  height: calc(100% - 60px);
  background-color: #fff;
  padding: 2px 8px;
  box-sizing: border-box;
  border: 1px solid #eeeeee;
  border-radius: 4px;
  overflow-y:scroll;
}
.allbed {
  height: 150px;
  opacity: 1;
  background: #ffffff;
  border: 1px solid #eeeeee;
  border-radius: 6px;
  box-shadow: 0px 3px 3px 0px rgba(0, 0, 0, 0.15);
  background-color: #fff;
  margin: 10px 15px 10px 0;
  box-sizing: border-box;
}
.bed-img {
  width: 30px;
  height: 18px;
}
.house-num {
  border-radius: 3px;
  font-size: 16px;
  height: 45px;
  width: 100%;
  line-height: 45px;
  text-align: center;
}
// 颜色归类
.one-span {
  color: #4090ff;
  border-color: #4090ff;
  background-color: #f1f7ff;
}
.two-span {
  color: #fb7c75;
  border-color: #fb7c75;
  background-color: #fef3f2;
}
.one-div {
  color: #ffffff;
  background-color: #71acfd;
}
.two-div {
  color: #ffffff;
  background-color: #b0d1fe;
}
// 灰色
.three-div {
  color: #555555;
  background-color: #f3f2f2;
}
.four-div {
  color: #ffffff;
  background-color: #fc9691;
}
.five-div {
  color: #ffffff;
  background-color: #fdbdba;
}
// 颜色归类
.ment-state {
  display: inline-block;
  width: 45px;
  height: 22px;
  line-height: 20px;
  text-align: center;
  background: #ffffff;
  border: 1px dashed;
  border-radius: 5px;
}

.ment-position {
  width: 110px;
  height: 110px;
  opacity: 0.9;
  border-radius: 3px;
  font-size: 16px;
}
</style>
